'use client'

import { createContext, useContext } from 'react'

interface DragContextType {
  handleMouseDown: (e: React.MouseEvent) => void
}

export const DragContext = createContext<DragContextType | null>(null)

export function useDrag() {
  const context = useContext(DragContext)
  if (!context) {
    throw new Error('useDrag must be used within a DragProvider')
  }
  return context
}
